package chapter7.No7_6_线程组内异常处理.demo2;

/**
 * Created by Administrator on 2016/12/8.
 */
public class MyThreadGroup extends ThreadGroup {
    public MyThreadGroup(String name) {
        super(name);
    }

    @Override
    public void uncaughtException(Thread t, Throwable e) {
        System.out.println("出错的线程名字为：" + t.getName());
        this.interrupt();
    }
}
